<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/6/4
  Time: 16:56
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<html>
<head>
    <title>登录</title>
    <style type="text/css">
        body {
            background-color: #DDDDDD;
        }

        .input {
            background-size: 25px 25px; /*小图标的大小*/
            background-position: 5px 5px; /*小图标在input的位置*/
            background-repeat: no-repeat; /*背景小图标不重复*/
            padding: 5px 10px 5px 40px; /*设置input内边距*/
            border: 1px solid #ddd; /*设置input样式好看*/
            margin: 20px 35px 10px 35px;
            width: 320px;
            height: 40px;
        }

        .system_title {
            text-align: center;
            font-family: "楷体", "楷体_GB2312";
            font-size: 50px;
            font-weight: bold;
        }

        .login_body {
            width: 1200px;
            height: 450px;
            margin: 40px auto;
            margin-bottom: 0px;
            border: 0px solid;
            border-radius: 8px;
            background-image: url(/img/loginbgbg.png);
        }

        .login {
            width: 400px;
            height: 450px;
            float: right;
            background-color: darkgray;
        }

        .radio {
            margin: 20px auto;
            text-align: center;
            font-size: 20px;
        }

        input[type="radio"] {
            zoom: 1.5;
            vertical-align: middle;
            margin: 5px;
        }

        input[type="submit"] {
            font-size: 20px;
            background-color: darkcyan;
            border: 0px solid;
            border-radius: 4px;
            height: 50px;
            margin: 10px 35px 10px 35px;
            width: 320px;
        }

        p {
            text-align: center;
            margin-top: 10px;
            font-family: "楷体", "楷体_GB2312";
            color: red;
        }

        a {
            text-decoration: none;
        }

        /* 未访问的链接 */
        a:link {
            color: #00aaff;
        }

        /* 已访问的链接 */
        a:visited {
            color: #aa0000;
        }

        /* 鼠标悬停链接 */
        a:hover {
            color: #0000ff;
        }
    </style>
    <script type="javascript"></script>
</head>
<body>
<img src="/img/school.png" height="100" width="277"/>

<script>
    var message =${message};
    if (message == "" || message == null) {
    }
    if (message == 400) {
        alert("登录失败，请检查用户名，密码和身份是否正确");
    }
    if (message == 100) { window.location.href = "/student/home";}
    if (message == 101) { window.location.href = "/teacher/home";}
    if (message == 102) { window.location.href = "/root/account";}
</script>

<div class="system_title">留学生信息管理系统</div>
<div class="login_body">
    <div class="login">
        <h1 align="center" style="margin:50px 30px 40px 30px;">用 户 登 录</h1>
        <form action="/login" method="post">
            <input type="text" name="user_id" class="input" style='background-image: url("/img/user.png")'
                   placeholder="学号或管理员账号"/><br>
            <input type="password" name="password" class="input" style='background-image: url("/img/pwd.png")'
                   placeholder="密码"/>
            <div class="radio">
                <input type="radio" name="identity" value="1" checked="checked"/><span>留学生</span>
                <input type="radio" name="identity" value="5"/><span>教师</span>
                <input type="radio" name="identity" value="9"/><span>管理员</span>
            </div>
            <center><input type="submit" value="登 录"/></center>
        </form>
        <p align="center">账号无法登录请联系管理员</p>
    </div>
</div>
<div style="text-align: center; margin-top: 0px;"><a href="#">版权所有 黄山学院国际教育学院 Copyright 2021-2023 All Rights
    Reserved</a></div>
</body>
</html>
